'''
Created on 2013-6-23

@author: ZuoPeng
'''

class P85(object):
    '''
    classdocs
    '''


    def __init__(self):
        '''
        Constructor
        '''
    def subRecNum(self,m,n):
#
#         return int(m * (m+1) * n * (n+1) / 4)
        result=0
        for a in range(m):
            for b in range(n):
                result+=(m-a)*(n-b)
        return result
    
    def calc(self):
        result=0
        sub=-1
        for m in range(1,20000):
            for n in range(1,m+1):
                recNum=self.subRecNum(m, n)
                if abs(recNum-2000000)<=sub or sub<0:
                    result=recNum
                    sub=abs(recNum-2000000)
                    print(str(m)+' '+str(n)+' '+ str(result))
#                 if result>2000000:
#                     break
#             if m%100==0:print('m='+str(m))
p=P85()
p.calc()

                